USE [Training]
GO

IF NOT EXISTS (SELECT * from dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.training_api_PositionInsert'))
	EXEC('CREATE PROC dbo.training_api_PositionInsert AS')
GO

ALTER PROC dbo.training_api_PositionInsert
	@Title		nvarchar(200),
	@PositionID	int output
AS
	INSERT INTO Position(
		Title)
	VALUES(
		@Title)
	SELECT @PositionID = SCOPE_IDENTITY()
